Skip to content

PosterBoard step 2: render linked cards at grid positions (read-only)#667

Open
burieberry wants to merge 5 commits into
cs-12213-posterboard-step-1-live-test-for-panzoom-board-first-boxelfrom
cs-12214-posterboard-step-2-render-linked-cards-at-grid-positions
Open

PosterBoard step 2: render linked cards at grid positions (read-only)#667
burieberry wants to merge 5 commits into
cs-12213-posterboard-step-1-live-test-for-panzoom-board-first-boxelfrom
cs-12214-posterboard-step-2-render-linked-cards-at-grid-positions

Conversation

@burieberry

Copy link
Copy Markdown

Stacked on #666 (step 1). Adds the v1 schema and read-only card rendering to the poster-board — no dragging yet (that's step 3, CS-12215).

Closes CS-12214.

What's here

  • Schema: @field cards = linksToMany(() => CardDef) and @field frameSettings = containsMany(FrameSettingsField) (cardIndex / x / y, exported for tests).
  • Tiles: each linked card renders fitted inside a FittedCardContainer @size='cardsgrid-tile' (dimensions come from FITTED_FORMATS — the same spec feeds the placement math via fittedFormatById), absolutely positioned by left/top inside the single transformed plane.
  • Placement: a card with a frame setting renders at its persisted position (Number()-coerced with Number.isFinite guards, since instance JSON is hand-editable); cards without settings flow into a 4-column default grid offset 10px from the world origin.
  • Empty state: the hint header (title + pan/zoom instructions) shows only when the board has no cards.
  • Demo instance: links five catalog cards with designed fitted views (wine bottles, tier list, Wordle, blackjack) — two via explicit frame settings, three grid-placed.

Known limitation

Cards whose fitted views read through their own linksTo relations (e.g. BlogPost → author) currently crash the whole board render — tracked as CS-12220 (degrade to a placeholder tile instead). The demo links only relation-free fitted views.

Testing

Live-test CI doesn't run on catalog-only PRs, so run locally: all 5 tests / 13 assertions pass (three step-1 tests, the momentum regression test, and the new placement test asserting persisted + grid-default positions and hidden hint header). ESLint, ember-template-lint, and glint pass for contents/poster-board/.

🤖 Generated with Claude Code

burieberry and others added 5 commits July 17, 2026 17:05
Adds the v1 schema (cards linksToMany, FrameSettingsField with
cardIndex/x/y) and renders each linked card as a fitted 280x364 tile
positioned by its frame setting, falling back to a 4-column grid layout.
The hint header now shows only on an empty board.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Tile dimensions now come from FITTED_FORMATS (cardsgrid-tile, 170x250)
via fittedFormatById, feeding both the placement math and the
--pb-tile-* CSS vars from one source instead of an invented 280x364.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The boxel-ui container applies the cardsgrid-tile dimensions from
FITTED_FORMATS itself, so the tile CSS no longer sets width/height and
the --pb-tile-* vars are gone; the placement math still derives its
constants from the same spec.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
FittedCardContainer tiles no longer re-declare the fitted-card container
context or force child sizing (the fitted rendering and CardContainer
already provide both), and cards without frame settings now start 10px
off the world origin instead of flush against it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Wine bottles, a tier list, Wordle, and the blackjack table — cards whose
fitted views don't traverse their own relations (CS-12220 tracks board
tolerance for tiles that do). Two tiles use explicit frame settings, the
rest flow into the default grid.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Staging Submissions Preview

This PR's content is pushed to the staging submissions realm: https://realms-staging.stack.cards/submissions/

Changed folders:

  • poster-board/

Updated at 2026-07-17 22:39:46 UTC for commit 82593e5. Shared realm: only this PR's changed files are pushed; files touched by multiple PRs reflect whichever pushed last, and deleted files are not removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant